package com.dds.system.service.union.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dds.system.mapper.union.UnionShopCategoryMapper;
import com.dds.system.domain.union.UnionShopCategory;
import com.dds.system.service.union.IUnionShopCategoryService;

/**
 * 分类Service业务层处理
 * 
 * @author gaolianjie
 * @date 2021-04-14
 */
@Service
public class UnionShopCategoryServiceImpl implements IUnionShopCategoryService 
{
    @Autowired
    private UnionShopCategoryMapper unionShopCategoryMapper;

    /**
     * 查询分类
     * 
     * @param cateId 分类ID
     * @return 分类
     */
    @Override
    public UnionShopCategory selectUnionShopCategoryById(Long cateId)
    {
        return unionShopCategoryMapper.selectUnionShopCategoryById(cateId);
    }

    /**
     * 查询分类列表
     * 
     * @param unionShopCategory 分类
     * @return 分类
     */
    @Override
    public List<UnionShopCategory> selectUnionShopCategoryList(UnionShopCategory unionShopCategory)
    {
        return unionShopCategoryMapper.selectUnionShopCategoryList(unionShopCategory);
    }

    /**
     * 新增分类
     * 
     * @param unionShopCategory 分类
     * @return 结果
     */
    @Override
    public int insertUnionShopCategory(UnionShopCategory unionShopCategory)
    {
        return unionShopCategoryMapper.insertUnionShopCategory(unionShopCategory);
    }

    /**
     * 修改分类
     * 
     * @param unionShopCategory 分类
     * @return 结果
     */
    @Override
    public int updateUnionShopCategory(UnionShopCategory unionShopCategory)
    {
        return unionShopCategoryMapper.updateUnionShopCategory(unionShopCategory);
    }

    /**
     * 批量删除分类
     * 
     * @param cateIds 需要删除的分类ID
     * @return 结果
     */
    @Override
    public int deleteUnionShopCategoryByIds(Long[] cateIds)
    {
        return unionShopCategoryMapper.deleteUnionShopCategoryByIds(cateIds);
    }

    /**
     * 删除分类信息
     * 
     * @param cateId 分类ID
     * @return 结果
     */
    @Override
    public int deleteUnionShopCategoryById(Long cateId)
    {
        return unionShopCategoryMapper.deleteUnionShopCategoryById(cateId);
    }
}
